<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>std.bitmanip</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "std.bitmanip";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/std.bitmanip.html" class="symbol">std.bitmanip</a></h1>
  
<div class="summary">Bit-level manipulation facilities.</div>
<p class="sec_header">Authors:</p><a href="http://digitalmars.com">Walter Bright</a>, <a href="http://erdani.org">Andrei
Alexandrescu</a>
<dl>
<dt class="decl">template <a class="symbol _template" name="myToString" href="./htmlsrc/std.bitmanip.html#L21" kind="template" beg="21" end="28">myToString</a><span class="tparams">(ulong n, string suffix = n &gt; uint.max ? "UL" : "U")</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#myToString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L21">#</a></dt>
<dd class="ddef">
<dl>
<dt class="decl">auto <a class="symbol _variable" name="myToString.myToString" href="./htmlsrc/std.bitmanip.html#L24" kind="variable" beg="24" end="24">myToString</a>; <span class="attrs">[<span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#myToString.myToString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L24">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">template <a class="symbol _template" name="createAccessors" href="./htmlsrc/std.bitmanip.html#L30" kind="template" beg="30" end="81">createAccessors</a><span class="tparams">(
    string store, T, string name, size_t len, size_t offset)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#createAccessors" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L30">#</a></dt>
<dd class="ddef">
<dl>
<dt class="decl">auto <a class="symbol _variable" name="createAccessors.result" href="./htmlsrc/std.bitmanip.html#L36" kind="variable" beg="36" end="36">result</a>; <span class="attrs">[<span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#createAccessors.result" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L36">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">template <a class="symbol _template" name="createStoreName" href="./htmlsrc/std.bitmanip.html#L83" kind="template" beg="83" end="89">createStoreName</a><span class="tparams">(Ts...)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#createStoreName" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L83">#</a></dt>
<dd class="ddef">
<dl>
<dt class="decl">auto <a class="symbol _variable" name="createStoreName.createStoreName" href="./htmlsrc/std.bitmanip.html#L86" kind="variable" beg="86" end="86">createStoreName</a>; <span class="attrs">[<span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#createStoreName.createStoreName" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L86">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">template <a class="symbol _template" name="createFields" href="./htmlsrc/std.bitmanip.html#L91" kind="template" beg="91" end="116">createFields</a><span class="tparams">(string store, size_t offset, Ts...)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#createFields" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L91">#</a></dt>
<dd class="ddef">
<dl>
<dt class="decl">alias ubyte <a class="symbol _alias" name="createFields.StoreType" href="./htmlsrc/std.bitmanip.html#L96" kind="alias" beg="96" end="96">StoreType</a>; <a title="Permalink to this symbol" href="#createFields.StoreType" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L96">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">auto <a class="symbol _variable" name="createFields.result" href="./htmlsrc/std.bitmanip.html#L108" kind="variable" beg="108" end="108">result</a>; <span class="attrs">[<span class="stc">manifest</span>]</span> <a title="Permalink to this symbol" href="#createFields.result" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L108">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">template <a class="symbol _template" name="bitfields" href="./htmlsrc/std.bitmanip.html#L165" kind="template" beg="165" end="168">bitfields</a><span class="tparams">(T...)</span>; <a title="Permalink to this symbol" href="#bitfields" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L165">#</a></dt>
<dd class="ddef">
<div class="summary">Allows creating bit fields inside <span class="d_param">struct</span>s and <span class="d_param">
class</span>es.</div>
<p class="sec_header">Example:</p><pre class="d_code">
<span class="k">struct</span> <span class="i">A</span>
{
    <span class="k">int</span> <span class="i">a</span>;
    <span class="k">mixin</span>(<span class="i">bitfields</span>!(
        <span class="k">uint</span>, <span class="sl">"x"</span>,    <span class="n">2</span>,
        <span class="k">int</span>,  <span class="sl">"y"</span>,    <span class="n">3</span>,
        <span class="k">uint</span>, <span class="sl">"z"</span>,    <span class="n">2</span>,
        <span class="k">bool</span>, <span class="sl">"flag"</span>, <span class="n">1</span>));
}
<span class="i">A</span> <span class="i">obj</span>;
<span class="i">obj</span>.<span class="i">x</span> = <span class="n">2</span>;
<span class="i">obj</span>.<span class="i">z</span> = <span class="i">obj</span>.<span class="i">x</span>;
</pre>
<p class="bl"/>
The example above creates a bitfield pack of eight bits, which fit in
one <span class="d_param">ubyte</span>. The bitfields are allocated starting from the
least significant bit, i.e. x occupies the two least significant bits
of the bitfields storage.
<p class="bl"/>
The sum of all bit lengths in one <span class="d_param">bitfield</span> instantiation
must be exactly 8, 16, 32, or 64. If padding is needed, just allocate
one bitfield with an empty name.
<p class="sec_header">Example:</p><pre class="d_code">
<span class="k">struct</span> <span class="i">A</span>
{
    <span class="k">mixin</span>(<span class="i">bitfields</span>!(
        <span class="k">bool</span>, <span class="sl">"flag1"</span>,    <span class="n">1</span>,
        <span class="k">bool</span>, <span class="sl">"flag2"</span>,    <span class="n">1</span>,
        <span class="k">uint</span>, <span class="sl">""</span>,         <span class="n">6</span>));
}
</pre>
<p class="bl"/>
The type of a bit field can be any integral type or enumerated
type. The most efficient type to store in bitfields is <span class="d_param">
bool</span>, followed by unsigned types, followed by signed types.
<dl>
<dt class="decl"><a class="symbol _enum" name="bitfields.enum" href="./htmlsrc/std.bitmanip.html#L167" kind="enum" beg="167" end="167">enum</a>; <a title="Permalink to this symbol" href="#bitfields.enum" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L167">#</a></dt>
<dd class="ddef">
<dl>
<dt class="decl"><a class="symbol _enummem" name="bitfields.enum.bitfields" href="./htmlsrc/std.bitmanip.html#L167" kind="enummem" beg="167" end="167">bitfields</a> <a title="Permalink to this symbol" href="#bitfields.enum.bitfields" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L167">#</a></dt>
<dd class="ddef"></dd></dl></dd></dl></dd>
<dt class="decl">struct <a class="symbol _struct" name="FloatRep" href="./htmlsrc/std.bitmanip.html#L189" kind="struct" beg="189" end="199">FloatRep</a>; <a title="Permalink to this symbol" href="#FloatRep" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L189">#</a></dt>
<dd class="ddef">
<div class="summary">Allows manipulating the fraction, exponent, and sign parts of a
   <span class="d_param">float</span> separately. The definition is:</div>
<pre class="d_code">
<span class="k">struct</span> <span class="i">FloatRep</span>
{
    <span class="k">union</span>
    {
        <span class="k">float</span> <span class="i">value</span>;
        <span class="k">mixin</span>(<span class="i">bitfields</span>!(
                  <span class="k">uint</span>,  <span class="sl">"fraction"</span>, <span class="n">23</span>,
                  <span class="k">ubyte</span>, <span class="sl">"exponent"</span>,  <span class="n">8</span>,
                  <span class="k">bool</span>,  <span class="sl">"sign"</span>,      <span class="n">1</span>));
    }
}
</pre>
<dl>
<dt class="decl"><a class="symbol _union" name="FloatRep.union" href="./htmlsrc/std.bitmanip.html#L191" kind="union" beg="191" end="198">union</a>; <a title="Permalink to this symbol" href="#FloatRep.union" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L191">#</a></dt>
<dd class="ddef">
<dl>
<dt class="decl">float <a class="symbol _variable" name="FloatRep.union.value" href="./htmlsrc/std.bitmanip.html#L193" kind="variable" beg="193" end="193">value</a>; <a title="Permalink to this symbol" href="#FloatRep.union.value" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L193">#</a></dt>
<dd class="ddef"></dd></dl></dd></dl></dd>
<dt class="decl">struct <a class="symbol _struct" name="DoubleRep" href="./htmlsrc/std.bitmanip.html#L220" kind="struct" beg="220" end="230">DoubleRep</a>; <a title="Permalink to this symbol" href="#DoubleRep" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L220">#</a></dt>
<dd class="ddef">
<div class="summary">Allows manipulating the fraction, exponent, and sign parts of a
   <span class="d_param">double</span> separately. The definition is:</div>
<pre class="d_code">
<span class="k">struct</span> <span class="i">DoubleRep</span>
{
    <span class="k">union</span>
    {
        <span class="k">double</span> <span class="i">value</span>;
        <span class="k">mixin</span>(<span class="i">bitfields</span>!(
                  <span class="k">ulong</span>,   <span class="sl">"fraction"</span>, <span class="n">52</span>,
                  <span class="k">ushort</span>,  <span class="sl">"exponent"</span>, <span class="n">11</span>,
                  <span class="k">bool</span>,    <span class="sl">"sign"</span>,      <span class="n">1</span>));
    }
}
</pre>
<dl>
<dt class="decl"><a class="symbol _union" name="DoubleRep.union" href="./htmlsrc/std.bitmanip.html#L222" kind="union" beg="222" end="229">union</a>; <a title="Permalink to this symbol" href="#DoubleRep.union" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L222">#</a></dt>
<dd class="ddef">
<dl>
<dt class="decl">double <a class="symbol _variable" name="DoubleRep.union.value" href="./htmlsrc/std.bitmanip.html#L224" kind="variable" beg="224" end="224">value</a>; <a title="Permalink to this symbol" href="#DoubleRep.union.value" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L224">#</a></dt>
<dd class="ddef"></dd></dl></dd></dl></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest" href="./htmlsrc/std.bitmanip.html#L232" kind="unittest" beg="232" end="258">unittest</a>; <a title="Permalink to this symbol" href="#unittest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L232">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">struct <a class="symbol _struct" name="BitArray" href="./htmlsrc/std.bitmanip.html#L264" kind="struct" beg="264" end="1200">BitArray</a>; <a title="Permalink to this symbol" href="#BitArray" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L264">#</a></dt>
<dd class="ddef">
<div class="summary">An array of bits.</div>
<dl>
<dt class="decl">size_t <a class="symbol _variable" name="BitArray.len" href="./htmlsrc/std.bitmanip.html#L266" kind="variable" beg="266" end="266">len</a>; <a title="Permalink to this symbol" href="#BitArray.len" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L266">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">uint* <a class="symbol _variable" name="BitArray.ptr" href="./htmlsrc/std.bitmanip.html#L267" kind="variable" beg="267" end="267">ptr</a>; <a title="Permalink to this symbol" href="#BitArray.ptr" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L267">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">size_t <a class="symbol _function" name="BitArray.dim" href="./htmlsrc/std.bitmanip.html#L269" kind="function" beg="269" end="272">dim</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#BitArray.dim" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L269">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">size_t <a class="symbol _function" name="BitArray.length" href="./htmlsrc/std.bitmanip.html#L274" kind="function" beg="274" end="277">length</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#BitArray.length" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L274">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">void <a class="symbol _function" name="BitArray.length:2" href="./htmlsrc/std.bitmanip.html#L279" kind="function" beg="279" end="300">length</a><span class="params">(size_t <em>newlen</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.length:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L279">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">bool <a class="symbol _function" name="BitArray.opIndex" href="./htmlsrc/std.bitmanip.html#L305" kind="function" beg="305" end="313">opIndex</a><span class="params">(size_t <em>i</em>)</span>; <span class="attrs">[<span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#BitArray.opIndex" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L305">#</a></dt>
<dt class="decl">bool <a class="symbol _function" name="BitArray.opIndexAssign" href="./htmlsrc/std.bitmanip.html#L329" kind="function" beg="329" end="341">opIndexAssign</a><span class="params">(bool <em>b</em>, size_t <em>i</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opIndexAssign" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L329">#</a></dt>
<dd class="ddef">
<div class="summary">Support for [<i>index</i>] operation for BitArray.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest" href="./htmlsrc/std.bitmanip.html#L315" kind="unittest" beg="315" end="326">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L315">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.dup" href="./htmlsrc/std.bitmanip.html#L346" kind="function" beg="346" end="354">dup</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#BitArray.dup" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L346">#</a></dt>
<dd class="ddef">
<div class="summary">Support for array.dup property for BitArray.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:2" href="./htmlsrc/std.bitmanip.html#L356" kind="unittest" beg="356" end="372">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L356">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="BitArray.opApply" href="./htmlsrc/std.bitmanip.html#L377" kind="function" beg="377" end="389">opApply</a><span class="params">(int delegate(inout bool) <em>dg</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opApply" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L377">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="BitArray.opApply:2" href="./htmlsrc/std.bitmanip.html#L392" kind="function" beg="392" end="404">opApply</a><span class="params">(int delegate(inout size_t, inout bool) <em>dg</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opApply:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L392">#</a></dt>
<dd class="ddef">
<div class="summary">Support for foreach loops for BitArray.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:3" href="./htmlsrc/std.bitmanip.html#L406" kind="unittest" beg="406" end="435">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L406">#</a></dt>

<dt class="decl">BitArray <a class="symbol _function" name="BitArray.reverse" href="./htmlsrc/std.bitmanip.html#L442" kind="function" beg="442" end="464">reverse</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#BitArray.reverse" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L442">#</a></dt>
<dd class="ddef">
<div class="summary">Support for array.reverse property for BitArray.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:4" href="./htmlsrc/std.bitmanip.html#L466" kind="unittest" beg="466" end="480">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L466">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.sort" href="./htmlsrc/std.bitmanip.html#L487" kind="function" beg="487" end="530">sort</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#BitArray.sort" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L487">#</a></dt>
<dd class="ddef">
<div class="summary">Support for array.sort property for BitArray.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:5" href="./htmlsrc/std.bitmanip.html#L532" kind="unittest" beg="532" end="543">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:5" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L532">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">bool <a class="symbol _function" name="BitArray.opEquals" href="./htmlsrc/std.bitmanip.html#L550" kind="function" beg="550" end="570">opEquals</a><span class="params">(BitArray <em>a2</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opEquals" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L550">#</a></dt>
<dd class="ddef">
<div class="summary">Support for operators == and != for bit arrays.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:6" href="./htmlsrc/std.bitmanip.html#L572" kind="unittest" beg="572" end="592">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:6" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L572">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="BitArray.opCmp" href="./htmlsrc/std.bitmanip.html#L598" kind="function" beg="598" end="623">opCmp</a><span class="params">(BitArray <em>a2</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opCmp" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L598">#</a></dt>
<dd class="ddef">
<div class="summary">Implement comparison operators.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:7" href="./htmlsrc/std.bitmanip.html#L625" kind="unittest" beg="625" end="650">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:7" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L625">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">void <a class="symbol _function" name="BitArray.init" href="./htmlsrc/std.bitmanip.html#L656" kind="function" beg="656" end="663">init</a><span class="params">(bool[] <em>ba</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.init" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L656">#</a></dt>
<dd class="ddef">
<div class="summary">Set BitArray to contents of ba[]</div></dd>
<dt class="decl">void <a class="symbol _function" name="BitArray.init:2" href="./htmlsrc/std.bitmanip.html#L672" kind="function" beg="672" end="682">init</a><span class="params">(void[] <em>v</em>, size_t <em>numbits</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.init:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L672">#</a></dt>
<dd class="ddef">
<div class="summary">Map BitArray onto v[], with numbits being the number of bits
 in the array. Does not copy the data.</div>
This is the inverse of opCast.</dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:8" href="./htmlsrc/std.bitmanip.html#L684" kind="unittest" beg="684" end="707">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:8" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L684">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">void[] <a class="symbol _function" name="BitArray.opCast" href="./htmlsrc/std.bitmanip.html#L712" kind="function" beg="712" end="715">opCast</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#BitArray.opCast" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L712">#</a></dt>
<dd class="ddef">
<div class="summary">Convert to void[].</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:9" href="./htmlsrc/std.bitmanip.html#L717" kind="unittest" beg="717" end="727">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:9" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L717">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.opCom" href="./htmlsrc/std.bitmanip.html#L732" kind="function" beg="732" end="744">opCom</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#BitArray.opCom" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L732">#</a></dt>
<dd class="ddef">
<div class="summary">Support for unary operator ~ for bit arrays.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:10" href="./htmlsrc/std.bitmanip.html#L746" kind="unittest" beg="746" end="760">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:10" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L746">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.opAnd" href="./htmlsrc/std.bitmanip.html#L766" kind="function" beg="766" end="781">opAnd</a><span class="params">(BitArray <em>e2</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opAnd" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L766">#</a></dt>
<dd class="ddef">
<div class="summary">Support for binary operator &amp; for bit arrays.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:11" href="./htmlsrc/std.bitmanip.html#L783" kind="unittest" beg="783" end="800">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:11" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L783">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.opOr" href="./htmlsrc/std.bitmanip.html#L806" kind="function" beg="806" end="821">opOr</a><span class="params">(BitArray <em>e2</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opOr" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L806">#</a></dt>
<dd class="ddef">
<div class="summary">Support for binary operator | for bit arrays.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:12" href="./htmlsrc/std.bitmanip.html#L823" kind="unittest" beg="823" end="840">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:12" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L823">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.opXor" href="./htmlsrc/std.bitmanip.html#L846" kind="function" beg="846" end="861">opXor</a><span class="params">(BitArray <em>e2</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opXor" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L846">#</a></dt>
<dd class="ddef">
<div class="summary">Support for binary operator ^ for bit arrays.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:13" href="./htmlsrc/std.bitmanip.html#L863" kind="unittest" beg="863" end="880">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:13" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L863">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.opSub" href="./htmlsrc/std.bitmanip.html#L888" kind="function" beg="888" end="903">opSub</a><span class="params">(BitArray <em>e2</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opSub" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L888">#</a></dt>
<dd class="ddef">
<div class="summary">Support for binary operator - for bit arrays.</div>
<i>a - b</i> for BitArrays means the same thing as <i>a &amp; ~b</i>.</dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:14" href="./htmlsrc/std.bitmanip.html#L905" kind="unittest" beg="905" end="922">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:14" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L905">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.opAndAssign" href="./htmlsrc/std.bitmanip.html#L928" kind="function" beg="928" end="940">opAndAssign</a><span class="params">(BitArray <em>e2</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opAndAssign" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L928">#</a></dt>
<dd class="ddef">
<div class="summary">Support for operator &amp;= bit arrays.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:15" href="./htmlsrc/std.bitmanip.html#L942" kind="unittest" beg="942" end="958">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:15" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L942">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.opOrAssign" href="./htmlsrc/std.bitmanip.html#L964" kind="function" beg="964" end="976">opOrAssign</a><span class="params">(BitArray <em>e2</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opOrAssign" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L964">#</a></dt>
<dd class="ddef">
<div class="summary">Support for operator |= for bit arrays.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:16" href="./htmlsrc/std.bitmanip.html#L978" kind="unittest" beg="978" end="994">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:16" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L978">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.opXorAssign" href="./htmlsrc/std.bitmanip.html#L999" kind="function" beg="999" end="1011">opXorAssign</a><span class="params">(BitArray <em>e2</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opXorAssign" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L999">#</a></dt>
<dd class="ddef">
<div class="summary">Support for operator ^= for bit arrays.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:17" href="./htmlsrc/std.bitmanip.html#L1013" kind="unittest" beg="1013" end="1029">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:17" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L1013">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.opSubAssign" href="./htmlsrc/std.bitmanip.html#L1036" kind="function" beg="1036" end="1048">opSubAssign</a><span class="params">(BitArray <em>e2</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opSubAssign" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L1036">#</a></dt>
<dd class="ddef">
<div class="summary">Support for operator -= for bit arrays.</div>
<i>a -= b</i> for BitArrays means the same thing as <i>a &amp;= ~b</i>.</dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:18" href="./htmlsrc/std.bitmanip.html#L1050" kind="unittest" beg="1050" end="1066">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:18" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L1050">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.opCatAssign" href="./htmlsrc/std.bitmanip.html#L1072" kind="function" beg="1072" end="1077">opCatAssign</a><span class="params">(bool <em>b</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opCatAssign" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L1072">#</a></dt>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.opCatAssign:2" href="./htmlsrc/std.bitmanip.html#L1103" kind="function" beg="1103" end="1110">opCatAssign</a><span class="params">(BitArray <em>b</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opCatAssign:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L1103">#</a></dt>
<dd class="ddef">
<div class="summary">Support for operator ~= for bit arrays.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:19" href="./htmlsrc/std.bitmanip.html#L1079" kind="unittest" beg="1079" end="1097">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:19" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L1079">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:20" href="./htmlsrc/std.bitmanip.html#L1112" kind="unittest" beg="1112" end="1132">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:20" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L1112">#</a></dt>

<dt class="decl">BitArray <a class="symbol _function" name="BitArray.opCat" href="./htmlsrc/std.bitmanip.html#L1137" kind="function" beg="1137" end="1145">opCat</a><span class="params">(bool <em>b</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opCat" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L1137">#</a></dt>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.opCat_r" href="./htmlsrc/std.bitmanip.html#L1148" kind="function" beg="1148" end="1157">opCat_r</a><span class="params">(bool <em>b</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opCat_r" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L1148">#</a></dt>
<dt class="decl">BitArray <a class="symbol _function" name="BitArray.opCat:2" href="./htmlsrc/std.bitmanip.html#L1160" kind="function" beg="1160" end="1167">opCat</a><span class="params">(BitArray <em>b</em>)</span>; <a title="Permalink to this symbol" href="#BitArray.opCat:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L1160">#</a></dt>
<dd class="ddef">
<div class="summary">Support for binary operator ~ for bit arrays.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="BitArray.unittest:21" href="./htmlsrc/std.bitmanip.html#L1169" kind="unittest" beg="1169" end="1199">unittest</a>; <a title="Permalink to this symbol" href="#BitArray.unittest:21" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.bitmanip.html#L1169">#</a></dt>
</dl></dd></dl>
</div>
<div id="footer">
  <p>Copyright © 1999-2008 by Digital Mars ®, All Rights Reserved.</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Sun Dec 28 04:26:34 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>